package com.maomao.maomaochong_i.personalPackage;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import com.maomao.maomaochong_i.R;
import com.maomao.maomaochong_i.application.MyApplication;

/**
 * Created by maomao on 2017/5/17.
 */

public class ForgetPassword extends AppCompatActivity implements View.OnClickListener{
    private EditText telephone, password;
    private Button getBut,resetBut;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.personal_forget_password);
        MyApplication.getInstance().addActivity(this);
        bindView();

    }

    private void bindView(){
        telephone = (EditText) findViewById(R.id.editText1);
        password = (EditText) findViewById(R.id.editText2);
        getBut = (Button) findViewById(R.id.but1);
        resetBut = (Button) findViewById(R.id.but2);

        getBut.setOnClickListener(this);
        resetBut.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent = null;
        switch(v.getId()) {
            // 获得验证码
            case R.id.but1:
                Toast.makeText(this,"倒计时开始",Toast.LENGTH_SHORT).show();
                break;

//            // 重设密码
            case R.id.but2:
                Toast.makeText(this,"倒计时开始",Toast.LENGTH_SHORT).show();
                intent = new Intent(ForgetPassword.this, ForgetPasswordAgain.class);
                startActivity(intent);
                break;
        }
    }
}
